package com.jw.blog.wblog.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author 无良芳
 * @since 2020-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_blog")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 博客标题
     */
    private String title;

    /**
     * 博客简介/摘要
     */
    private String introduction;

    private String keyword;

    /**
     * 封面缩略图等
     */
    private String images;

    /**
     * 博客内容
     */
    private String content;

    /**
     * 点击量
     */
    @TableField("clickNum")
    private Integer clickNum;

    /**
     * 评论量
     */
    @TableField("commentNum")
    private Integer commentNum;

    /**
     * 点赞量
     */
    @TableField("agreeNum")
    private Integer agreeNum;

    /**
     * 1置顶，0普通
     */
    @TableField("isTop")
    private Integer isTop;

    /**
     * 博主推荐,1为推荐，0为普通
     */
    @TableField("isRecommend")
    private Integer isRecommend;

    @TableField("updateTime")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableField("addTime")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime addTime;

    /**
     * -1为草稿，1为正文，2为回收站
     */
    private Integer status;

    /**
     * 类别id
     */
    private String typeId;

}
